/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package receiptReaderTool;

import Structures.Entry_rawDecorator;
import java.util.LinkedList;
import javax.swing.AbstractListModel;
import javax.swing.ListModel;
import javax.swing.event.ListDataListener;

/**
 *
 * @author Mariusz
 */
public class receiptReaderTool_jListProductModel extends AbstractListModel{
    public LinkedList<Entry_rawDecorator> prod;

    receiptReaderTool_jListProductModel(LinkedList<Entry_rawDecorator> products) {
        this.prod = products;
    }

    @Override
    public int getSize() {
        return prod.size();
    }

    @Override
    public Object getElementAt(int index) {
        return prod.get(index);
    }
    
    @Override
    public void addListDataListener(ListDataListener l) {
        super.addListDataListener(l);
    }

    @Override
    public void removeListDataListener(ListDataListener l) {
        super.removeListDataListener(l);
    }
    
    public Object removeElementAt(int index) {
        return prod.remove(index);
    }
    
}
